Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: add Windows-specific info to subprocess.kill #34867

Merged
merged 1 commit into from
Mar 30, 2021

Conversation

joaolucasl
Copy link
Contributor

Clarify the inner workings of subprocess.kill() on Windows,since termination signals are not available there.

I used the the LibUV docs to make sure that this was the actual behaviour, after noticing the code on internal/child_process would ultimately call it via process_wrap.

Fixes: #34858

Checklist

@nodejs-github-bot nodejs-github-bot added child_process Issues and PRs related to the child_process subsystem. doc Issues and PRs related to the documentations. labels Aug 21, 2020
Copy link
Member

@juanarbol juanarbol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice.

Not a blocker: I'd put this just after the Linux specification and before code example.

@s4m0r4m4
Copy link

Looks good to me, thanks!

@targos
Copy link
Member

targos commented Aug 22, 2020

@nodejs/child_process

@joaolucasl joaolucasl force-pushed the docs/windows-child-process-kill branch from 8d40f81 to 28587cd Compare August 22, 2020 16:37
@s4m0r4m4
Copy link

s4m0r4m4 commented Sep 9, 2020

Who do we need to give the OK and merge this in? I see @jasnell approved it, not sure if he can merge it.

@@ -1133,6 +1133,10 @@ may not actually terminate the process.

See kill(2) for reference.

On Windows the child process will be forcefully terminated since
`SIGKILL` and `SIGTERM` signals are not available.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this say SIGINT and SIGTERM instead?
If I'm not mistaken, SIGINT isn't available here either.
And SIGKILL, if available, forcibly terminates (so it's unavailability doesn't help explain why child process must be forcefully terminated.. SIGKILL wouldn't be useful for avoiding forceful termination anyways).

@DerekNonGeneric DerekNonGeneric added the windows Issues and PRs related to the Windows platform. label Sep 13, 2020
@aduh95
Copy link
Contributor

aduh95 commented Nov 8, 2020

@joaolucasl This needs a rebase, and there is one comment left that needs to be addressed before landing.

@aduh95 aduh95 added the stalled Issues and PRs that are stalled. label Nov 8, 2020
@github-actions
Copy link
Contributor

github-actions bot commented Nov 8, 2020

This issue/PR was marked as stalled, it will be automatically closed in 30 days. If it should remain open, please leave a comment explaining why it should remain open.

@joaolucasl
Copy link
Contributor Author

Will update it this week.

doc/api/child_process.md Outdated Show resolved Hide resolved
doc/api/child_process.md Outdated Show resolved Hide resolved
@PoojaDurgad
Copy link
Contributor

@joaolucasl - looks like this PR have gotten a little stuck. need a rebase to resolve git conflicts

@Trott Trott force-pushed the docs/windows-child-process-kill branch from 7160bc5 to c0ba12a Compare January 8, 2021 03:07
@Trott
Copy link
Member

Trott commented Jan 8, 2021

I rebased, fixed the merge conflict, fixed the lint error, squashed, and force pushed.

doc/api/child_process.md Outdated Show resolved Hide resolved
@joaolucasl joaolucasl force-pushed the docs/windows-child-process-kill branch from c0ba12a to 57f3583 Compare March 26, 2021 16:55
@joaolucasl
Copy link
Contributor Author

Sorry for the huge delay in updating this. Thanks @zenflow for the suggestion.

Ready for review!

@aduh95 aduh95 added author ready PRs that have at least one approval, no pending requests for changes, and a CI started. review wanted PRs that need reviews. labels Mar 26, 2021
Clarify the inner workings of .kill on Windows,
since termination signals are not available there.

Fixes: nodejs#34858

PR-URL: nodejs#34867
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
@Trott Trott force-pushed the docs/windows-child-process-kill branch from 57f3583 to 504ed7c Compare March 30, 2021 11:08
@Trott
Copy link
Member

Trott commented Mar 30, 2021

Landed in 504ed7c

@Trott Trott merged commit 504ed7c into nodejs:master Mar 30, 2021
MylesBorins pushed a commit that referenced this pull request Apr 4, 2021
Clarify the inner workings of .kill on Windows,
since termination signals are not available there.

Fixes: #34858

PR-URL: #34867
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
@MylesBorins MylesBorins mentioned this pull request Apr 4, 2021
targos pushed a commit that referenced this pull request May 1, 2021
Clarify the inner workings of .kill on Windows,
since termination signals are not available there.

Fixes: #34858

PR-URL: #34867
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
@danielleadams danielleadams mentioned this pull request May 3, 2021
@joaolucasl joaolucasl deleted the docs/windows-child-process-kill branch June 11, 2021 12:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author ready PRs that have at least one approval, no pending requests for changes, and a CI started. child_process Issues and PRs related to the child_process subsystem. doc Issues and PRs related to the documentations. review wanted PRs that need reviews. stalled Issues and PRs that are stalled. windows Issues and PRs related to the Windows platform.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

doc: child_process.kill() on windows needs clarification